﻿// Copyright (c) Inossem. All rights reserved.
// Licensed under the LGPL-3.0 license. See LICENSE file in the project root for full license information.
using DWF.Studio.Models;
using DWF.Studio.Script;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace DWF.Studio.ISerivces
{
    internal interface ISearchService:IService
    {
        void OpenSearchBox(double windowWidth);
        /// <summary>
        /// 获取焦点
        /// </summary>
        /// <param name="idRef"></param>
        void FocusActivityByIdRef(ScriptBase scriptBase,string idRef);
        /// <summary>
        /// 防抖
        /// </summary>
        /// <param name="timeMs"></param>
        /// <param name="invoker"></param>
        /// <param name="action"></param>
        void Debounce(int timeMs, ISynchronizeInvoke invoker, Action action);
        /// <summary>
        /// 节流阀
        /// </summary>
        /// <param name="timeMs"></param>
        /// <param name="invoker"></param>
        /// <param name="action"></param>
        void Throttle(int timeMs, ISynchronizeInvoke invoker, Action action);
        /// <summary>
        /// 加载
        /// </summary>
        /// <returns></returns>
        FrameworkElement LoadSearchHost();

        void Dispose();
    }
}
